home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os300b / ex_mem2 / exampl17.asm next >
Encoding:
Assembly Source File  |  1996-11-29  |  2.2 KB  |  72 lines

  1. ;╔══════════════════════════════════════════════════════════════════════════╗
  2. ;║                                                                          ║
  3. ;║ This example show how to use the Memory library                          ║
  4. ;║                                                                          ║
  5. ;║                                                                          ║
  6. ;║                                                                          ║
  7. ;║ Tabs : 13 21 29 37                                                       ║
  8. ;║                                                                          ║
  9. ;╚══════════════════════════════════════════════════════════════════════════╝
  10.  
  11. Locals
  12. .386
  13. CODE32 SEGMENT PUBLIC PARA 'CODE' USE32
  14. ASSUME  CS:CODE32,DS:CODE32,ES:CODE32
  15.  
  16. INCLUDE ..\RESOURCE\EOS.INC
  17.  
  18. Msg         db '    ■ Press a key...',13,10,36
  19.  
  20. File_Pic1   db '..\data\test640.DLZ',0
  21.  
  22. Start32:
  23.             call Init_Memory        ; Init the lib
  24.  
  25.             mov ah,9
  26.             mov edx,O Msg
  27.             int 21h                 ; Display String
  28.  
  29.             mov ah,Load_Internal_File
  30.             mov edx,O File_Pic1
  31.             Int_EOS                 ; Load a file
  32.  
  33.             xor ah,ah               ; Wait a key
  34.             DosInt 16h
  35.  
  36.             mov ah,9
  37.             mov edx,O Msg
  38.             int 21h                 ; Display String
  39.  
  40.             mov ah,Load_Internal_File
  41.             mov edx,O File_Pic1
  42.             Int_EOS                 ; Load a file
  43.  
  44.             xor ah,ah               ; Wait a key
  45.             DosInt 16h
  46.  
  47.             mov ah,9
  48.             mov edx,O Msg
  49.             int 21h                 ; Display String
  50.  
  51.             mov ah,DeAllocate_Memory
  52.             Int_EOS                 ; Dispose memory
  53.  
  54.             xor ah,ah               ; Wait a key
  55.             DosInt 16h
  56.  
  57.             mov ah,9
  58.             mov edx,O Msg
  59.             int 21h                 ; Call Display String
  60.  
  61.             mov ah,DeAllocate_Memory
  62.             Int_EOS                 ; Dispose memory
  63.  
  64.             xor ah,ah               ; Wait a key
  65.             DosInt 16h
  66.  
  67.             mov ax,4c00h
  68.             int 21h                 ; Exit with Error Code 0
  69.  
  70.             CODE32 ENDS
  71.  
  72.             END